Legendre Symbol

Motivated by Euler's criterion, the Legendre symbol is a compact notation to encompass if a is a quadratic residue modulo p.

Definition

For a and an odd prime p, the Legendre symbol (ap) is given by the function:

(ap)={1if a is a quadratic residue modulo p0if a0(modp)1if a is a quadratic non-residue modulo p

This definition means, by Euler's criterion, that

(ap)ap12(modp)

noting that in the new case when a0(modp) then ap120(modp).

The Legendre symbol is multiplicative, which is very useful when computing it.